/**
 * 健康度模型
 *
 * Created by snowingsea on 2020/01/22.
 */
const request = require('request-promise');
const uri = require('./../api/health/uri');

/**
 * ping操作
 * @return {Promise}
 */
function ping() {
  return new Promise((resolved, reject) => {
    const url = `${uri}/ping.json`;
    request(url)
      .then(resolved)
      .catch(reject);
  });
}

/**
 * Export model definition object.
 */
module.exports = {
  ping,
};
